/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package competition.JPA;

import competition.DAO.SportDAO;
import competition.JpaUtil;
import competition.business.Sport;
import java.util.List;
import javax.persistence.Query;

/**
 *
 * @author Administrateur
 */
public class JPASport extends JPAEvent implements SportDAO {

    public List<Sport> GetSportByStrength(int Strength) {
        Query query = JpaUtil.getEntityManager().createQuery("SELECT sport FROM " +
        "AbstractEvent AS sport WHERE sport.STRENGTH = " + Integer.toString(Strength));
        
        return query.getResultList();
    }

}
